<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>

</body>
<script>
let obj = {username: 'zs', age: 20, data: {data: '123', success:false, message: '产生错误'}}

// 普通解构
let {username,age} = obj
// 层层解构
let {data:{data,success}} =obj
// 取别名
let {data:{data:token}} = obj
console.log(token);
</script>
</html>
